package cn.yangliu.jpa.annotations.sql;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import cn.yangliu.jpa.enums.LinkTypeEnum;
import cn.yangliu.jpa.enums.QueryTypeEnum;

/**
 * The interface Jpa sql query.
 *
 * @author 问道于盲
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface JpaSqlQuery {

    /**
     * Column string.
     *
     * @return the string
     */
    String[] columns() default {};

    /**
     * Link link type enum.
     *
     * @return the link type enum
     */
    LinkTypeEnum link() default LinkTypeEnum.AND;


    /**
     * Inner link link type enum.
     *
     * @return the link type enum
     */
    LinkTypeEnum innerLink() default LinkTypeEnum.OR;

    /**
     * Type query type enum.
     *
     * @return the query type enum
     */
    QueryTypeEnum type() default QueryTypeEnum.EQ;

    /**
     * 排序号
     *
     * @return int
     */
    int order() default Integer.MAX_VALUE;
}

